package com.pine.app.module.security.oauth.exception;

import com.pine.app.module.security.core.common.enums.ErrorType;

/**
 * @author xiaoyuan
 * @create 2019/9/30 9:28
 **/
public class GrantTokenException extends RuntimeException {
    private ErrorType errorType;

    public GrantTokenException(ErrorType errorType) {
        this(errorType, errorType.message());
    }

    public GrantTokenException(ErrorType errorType, String message) {
        super(message);
        this.errorType = errorType;
    }

    public ErrorType getErrorType() {
        return errorType;
    }
}
